﻿<%@ Page Language="C#" MasterPageFile="~/Management/ManagementMasterPage.master"
    AutoEventWireup="true" Inherits="Management_ProductEditor" EnableEventValidation="true"
    Title="逸品--管理端" CodeBehind="ProductEditor.aspx.cs" %>

<%@ Register Src="../../Controls/CategoryCascadingDropDown.ascx" TagName="CategoryCascadingDropDown"
    TagPrefix="uc1" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content2" ContentPlaceHolderID="cphContent" runat="Server">
    <link href="../../css/jquery.ui.theme.css" rel="stylesheet" type="text/css" />
    <link href="../../css/jquery.ui.datepicker.css" rel="stylesheet" type="text/css" />
    <script src="../../js/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="../../js/jquery.ui.core.js" type="text/javascript"></script>
    <script src="../../js/jquery.ui.datepicker.js" type="text/javascript"></script>
    <script>        $(function () { $("#<%=txtPublishDate.ClientID%>").datepicker(); });</script>
    <table style="border-width: 2px;" frame="border">
        <tr>
            <td style="width: 155px">
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 155px">
                产品编号：
            </td>
            <td>
                <asp:TextBox ID="txtCode" runat="server" Width="184px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 155px">
                产品名称:
            </td>
            <td>
                <asp:TextBox ID="txtProductName" runat="server">（7位）</asp:TextBox>
                &nbsp;<asp:Literal ID="ltlNeedProductName" runat="server" Text="*" Visible="False"></asp:Literal>
            </td>
        </tr>
        <tr bgcolor="Fuchsia">
            <td style="width: 155px">
                产品小图片:
            </td>
            <td>
                <div>
                    <asp:FileUpload ID="fuProductPic" runat="server" />
                    <asp:Button ID="btnUpload" runat="server" Text="上传" OnClick="btnUpload_Click" />
                </div>
                <div>
                    <asp:TextBox ID="txtProductPic" runat="server" Width="400"></asp:TextBox>
                    <asp:Button ID="btnSetProductPic" runat="server" Text="指定图片" OnClick="btnSetProductPic_Click" />
                </div>
                <div>
                    <asp:Image ID="imgProductPic" runat="server" BorderWidth="0px" Visible="false" />
                </div>
            </td>
        </tr>
        <tr bgcolor="#6699FF">
            <td style="width: 155px">
                产品大图
            </td>
            <td>
                <div>
                    产品详情图:<asp:FileUpload ID="fuProductRecommend1" runat="server" />
                    <asp:Button ID="btnUpload2" runat="server" Text="上传" OnClick="btnUpload2_Click" />
                    <asp:Image ID="Image2" runat="server" BorderWidth="0px" Visible="true" />
                </div>
                <div visible="false">
                    第二张:<asp:FileUpload ID="fuProductRecommend2" runat="server" /><asp:Button ID="btnUpload3"
                        runat="server" Text="上传" OnClick="btnUpload3_Click" Style="width: 40px" />
                    <asp:Image ID="Image3" runat="server" BorderWidth="0px" Visible="true" />
                </div>
                <div>
                    配送说明区图片:<asp:FileUpload ID="fuProductRecommend3" runat="server" /><asp:Button ID="btnUpload4"
                        runat="server" Text="上传" OnClick="btnUpload4_Click" />
                    <asp:Image ID="Image4" runat="server" BorderWidth="0px" Visible="true" />
                </div>
                <div>
                    退换货说明区图片:<asp:FileUpload ID="fuProductRecommend4" runat="server" /><asp:Button ID="btnUpload5"
                        runat="server" Text="上传" OnClick="btnUpload5_Click" />
                    <asp:Image ID="Image5" runat="server" BorderWidth="0px" Visible="true" />
                </div>
            </td>
        </tr>
        <tr>
            <td style="width: 155px">
                产品分类:
            </td>
            <td>
                <%--                <asp:UpdatePanel ID="upCategory" runat="server" RenderMode="Inline">
                    <ContentTemplate>
                    </ContentTemplate>
                </asp:UpdatePanel>--%>
                <asp:DropDownList ID="ddlLv1Category" DataTextField="Name" DataValueField="CategoryId"
                    runat="server" OnSelectedIndexChanged="ddlLv1Category_SelectedIndexChanged" Width="90"
                    AutoPostBack="True" />
                <asp:DropDownList ID="ddlLv2Category" DataTextField="Name" DataValueField="CategoryId"
                    runat="server" OnSelectedIndexChanged="ddlLv2Category_SelectedIndexChanged" Width="90"
                    AutoPostBack="true" />
                <asp:DropDownList ID="ddlLv3Category" DataTextField="Name" DataValueField="CategoryId"
                    runat="server">
                </asp:DropDownList>
<%--                <asp:UpdatePanel ID="UpdatePanel5" runat="server">
                    <ContentTemplate>
                        
                    </ContentTemplate>
                </asp:UpdatePanel>--%><uc1:CategoryCascadingDropDown ID="ddlProductCategory" runat="server" TopCategoryName="Category_L"
                            ShowLv2Category="True" Visible="false" ShowLv3Category="True" />
                        <asp:CheckBox ID="cbCategory1" runat="server" Text="所属第二种分类" Visible="false" />
                        <uc1:CategoryCascadingDropDown ID="ddlProductCategory2" runat="server" TopCategoryName="Category_L"
                            ShowLv2Category="True" Visible="false" />
                        <asp:CheckBox ID="cbCategory2" runat="server" Text="所属第三种分类" Visible="false" />
                        <uc1:CategoryCascadingDropDown ID="ddlProductCategory3" runat="server" TopCategoryName="Category_L"
                            ShowLv2Category="True" Visible="false" />
                        <asp:CheckBox ID="cbCategory3" runat="server" Text="所属第四种分类" Visible="false" />
                        <uc1:CategoryCascadingDropDown ID="ddlProductCategory4" runat="server" TopCategoryName="Category_L"
                            ShowLv2Category="True" Visible="false" />
                        <asp:CheckBox ID="CheckBox1" runat="server" Text="所属第五种分类" Visible="false" />
                        <uc1:CategoryCascadingDropDown ID="ddlProductCategory5" runat="server" TopCategoryName="Category_L"
                            ShowLv2Category="True" Visible="false" />
                <asp:Button ID="btnNewCategory" runat="server" Text="新增分类" OnClick="btnNewCategory_Click"
                    Visible="False" />
                <asp:Panel ID="pnlNewCategorys" runat="server" Width="320px" Visible="False" BackColor="AliceBlue">
                    <div>
                        分类名称:
                        <asp:TextBox ID="txtNewCategoryName" runat="server"></asp:TextBox><asp:Literal ID="ltlNeedCategoryName"
                            runat="server" Text="*" Visible="False"></asp:Literal><asp:CheckBox ID="cbCreateSubCategory"
                                runat="server" AutoPostBack="True" Text="新增子分类" OnCheckedChanged="cbCreateSubcategory_CheckedChanged" />
                        <asp:CheckBox ID="cbCreateThirdCategory" runat="server" AutoPostBack="true" Text="新增第三级分类"
                            OnCheckedChanged="cbCreateThirdCategory_CheckedChanged" />
                    </div>
                    <asp:Panel ID="panelSecoundCategory" runat="server" Visible="False">
                        第二级分类：<asp:DropDownList ID="ddlSecoundCategory" runat="server" Visible="true">
                        </asp:DropDownList>
                    </asp:Panel>
                    <asp:Panel ID="pnlMainCategory" runat="server" Visible="False">
                        <div>
                            主分类:
                            <uc1:CategoryCascadingDropDown ID="ddlNewCategory" runat="server" TopCategoryName="Category_L"
                                ShowLv2Category="True" />
                        </div>
                        <div>
                            <asp:FileUpload ID="fuCategoryPicture" runat="server" />
                            <asp:Button ID="btnUploadCategoryPicture" runat="server" Text="上传" OnClick="btnUploadCategoryPicture_Click" />
                            <asp:TextBox ID="txtShowPicturePath" runat="server"></asp:TextBox><asp:Button ID="btnShowPicture"
                                runat="server" Text="查看图片" OnClick="btnShowPicture_Click" />
                            <asp:Image ID="Image1" runat="server" ImageUrl="~/Upload/Category/cc053a3c-2342-4cd7-922c-9c56e51fbe1e.jpg" />
                        </div>
                    </asp:Panel>
                    <div>
                        <asp:Button ID="btnInsertCategory" runat="server" Text="新增" OnClick="btnInsertCategory_Click" />
                        <asp:Button ID="btnCancelCategory" runat="server" Text="取消" OnClick="btnCancel_Click" />
                    </div>
                </asp:Panel>
                <%--<cc1:ModalPopupExtender ID="mpeCategory" runat="server" PopupControlID="pnlNewCategory"
                    CancelControlID="btnCancelCategory" TargetControlID="btnNewCategory" BackgroundCssClass="ModalBackground" />--%>
            </td>
        </tr>
        <tr>
            <td style="display: none; width: 155px">
                该产品包含几瓶酒：
            </td>
            <td style="display: none;">
                <asp:TextBox ID="txtWeight" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 155px">
                上线时间:
            </td>
            <td>
                <asp:TextBox ID="txtPublishDate" runat="server"></asp:TextBox>
                <%--<cc1:CalendarExtender
                    ID="txtPublishDate_CalendarExtender" runat="server" Enabled="True" TargetControlID="txtPublishDate">
                </cc1:CalendarExtender>--%>
            </td>
        </tr>
        <tr>
            <td style="width: 155px">
                产品真实价格:
            </td>
            <td>
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 155px">
                产品市场价:
            </td>
            <td>
                <asp:TextBox ID="txtPrice" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 155px">
                产品描述:
            </td>
            <td>
                <FCKeditorV2:FCKeditor ID="fckBody" runat="server" BasePath="~/FCKEditor/" AutoDetectLanguage="true"
                    Height="500px">
                </FCKeditorV2:FCKeditor>
            </td>
        </tr>
        <tr>
            <td style="width: 155px">
                关键字:
            </td>
            <td>
                <asp:TextBox ID="TextBox2" runat="server" TextMode="MultiLine" Rows="20" Width="600" />
            </td>
        </tr>
        <tr>
            <td style="width: 155px">
                描述:
            </td>
            <td>
                <asp:TextBox ID="TextBox3" runat="server" TextMode="MultiLine" Rows="20" Width="600" />
            </td>
        </tr>
        <tr>
            <td style="width: 155px">
                &nbsp;
            </td>
            <td>
                <asp:Button ID="btnInsertProduct" runat="server" Text="新增" Visible="false" OnClick="btnInsertProduct_Click" />
                <asp:Button ID="btnEditProduct" runat="server" Text="修改" Visible="false" OnClick="btnEditProduct_Click" />
                <asp:Button ID="btnCancel" runat="server" Text="取消" />
            </td>
        </tr>
        <tr>
            <td style="width: 155px">
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 155px">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 155px">
                &nbsp;
            </td>
            <td>
                <asp:TextBox ID="txtSize" runat="server" Visible="False"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 155px">
                &nbsp;
            </td>
            <td>
                <asp:Repeater ID="rptHairFit" runat="server" Visible="False">
                    <ItemTemplate>
                        <%# Eval("Name") %>:
                        <asp:TextBox ID="txtScore" runat="server" Width="30"></asp:TextBox><asp:RangeValidator
                            ID="RangeValidator1" runat="server" ControlToValidate="txtScore" MinimumValue="0"
                            MaximumValue="100" Display="Dynamic" Type="Integer" ErrorMessage="0--100"></asp:RangeValidator><asp:HiddenField
                                ID="hfCategoryId" runat="server" Value='<%# Eval("CategoryId") %>' />
                    </ItemTemplate>
                </asp:Repeater>
            </td>
        </tr>
        <tr>
            <td style="width: 155px">
                &nbsp;
            </td>
            <td>
                <asp:Repeater ID="rptSkinFit" runat="server" Visible="False">
                    <ItemTemplate>
                        <%# Eval("Name") %>:
                        <asp:TextBox ID="txtScore" runat="server" Width="30"></asp:TextBox><asp:RangeValidator
                            ID="RangeValidator1" runat="server" ControlToValidate="txtScore" MinimumValue="0"
                            MaximumValue="100" Display="Dynamic" Type="Integer" ErrorMessage="0--100"></asp:RangeValidator><asp:HiddenField
                                ID="hfCategoryId" runat="server" Value='<%# Eval("CategoryId") %>' />
                    </ItemTemplate>
                </asp:Repeater>
            </td>
        </tr>
    </table>
</asp:Content>
